﻿using System;
using System.Collections.Generic;
using System.Text;
using Cemit.PolyProto;
using Google.Protobuf;

namespace Cemit.PolyServer
{
    [Obsolete("TODO: 分发角色数据消息")]
    class GetPlayerDataHandle : IMessageHandle<Msg_Lobby_GetPlayerData>
    {
        public void Execute(ClientState clientState, IMessage message)
        {
            Msg_Lobby_GetPlayerData msg = message as Msg_Lobby_GetPlayerData;
            if (msg.UsedToCreate)
            {
                Msg_Lobby_CreatePlayer createMsg = new Msg_Lobby_CreatePlayer
                {
                    PlayerData = msg.PlayerData
                };

                if (string.IsNullOrEmpty(msg.Requester))
                {
                    //PolyServer.SendToAllPlayers(createMsg);
                }
                else
                {
                    //PolyServer.Send(msg.Requester, createMsg);
                }
            }
        }
    }
}
